<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/echars.js"></script>
    <link rel="stylesheet" href="./css/ex001.css">
</head>
<body>
    <div class="box"></div>
    <script>
        var myChar = echarts.init(document.querySelector('.box'));
        var myOption = {
            series : [
                {
                    name: '访问来源',
                    type: 'pie',
                    radius: '45%',
                    roseType: 'angle',
                    data:[
                        {value:235, name:'视频广告'},
                        {value:274, name:'联盟广告'},
                        {value:310, name:'邮件营销'},
                        {value:335, name:'直接访问'},
                        {value:400, name:'搜索引擎'}
                    ],
                    itemStyle: {
                        normal: {
                            shadowBlur: 20,
                            shadowColor: 'rgba(0, 0, 0, 0.8)'
                        }
                    }
                }
            ]
        }
    
        myChar.setOption(myOption);
    </script>
</body>
</html>